package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 蜗牛视频活动banner
 * </p>
 *
 * @author jiangzhuan
 * @since 2021-11-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("index_banner")
public class IndexBanner extends Model<IndexBanner> {

    private static final long serialVersionUID=1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * banner类型 0：首页活动banner
     */
    private Integer type;

    /**
     * 标题
     */
    private String title;

    /**
     * 图链接
     */
    private String url;

    /**
     * 介绍
     */
    private String content;

    /**
     * 0下架 1上架
     */
    private Integer state;

    /**
     * 逻辑删除 0:已删除 1:未删除
     */
    private Integer deleted;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 创建人
     */
    private Integer createBy;

    /**
     * 更新人
     */
    private Integer updateBy;

    /**
     * 排序
     */
    private Integer seq;

    /**
     * 跳转链接
     */
    private String link;

    /**
     * 跳转目标 0:不跳转 1：APP链接 2：外部链接
     */
    private Integer target;


    public static final String ID = "id";

    public static final String TYPE = "type";

    public static final String TITLE = "title";

    public static final String URL = "url";

    public static final String CONTENT = "content";

    public static final String STATE = "state";

    public static final String DELETED = "deleted";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String CREATE_BY = "create_by";

    public static final String UPDATE_BY = "update_by";

    public static final String SEQ = "seq";

    public static final String LINK = "link";

    public static final String TARGET = "target";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
